<h1>Listing graphic_items</h1>

<table>
  <tr>
  <% for column in GraphicItem.content_columns %>
    <th><%= column.human_name %></th>
  <% end %>
  </tr>
  
<% for graphic_item in @graphic_items %>
  <tr>
  <% for column in GraphicItem.content_columns %>
  <% if column.name == "data" %>
  <td><img src="/binary/get_item/<%= graphic_item.id %>"></td>
  <% else%>
    <td><%=h graphic_item.send(column.name) %></td>
    <% end %>
  <% end %>
    <td><%= link_to 'Show', :action => 'show', :id => graphic_item %></td>
    <td><%= link_to 'Edit', :action => 'edit', :id => graphic_item %></td>
    <td><%= link_to 'Destroy', { :action => 'destroy', :id => graphic_item }, :confirm => 'Are you sure?', :method => :post %></td>
  </tr>
<% end %>
</table>

<%= link_to 'Previous page', { :page => @graphic_item_pages.current.previous } if @graphic_item_pages.current.previous %>
<%= link_to 'Next page', { :page => @graphic_item_pages.current.next } if @graphic_item_pages.current.next %> 

<br />

<%= link_to 'New graphic_item', :action => 'new' %>
